ToArray Method

Task Parallel System.Threading

Copies the items from the BlockingCollection<(Of <(T>)>) instance into a new array.

Namespace:  System.Collections.Concurrent
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Function ToArray As T()
C#
public T[] ToArray()

Return Value

An array containing copies of the elements of the collection.

Remarks

The copied elements are not removed from the collection.

Exceptions

ExceptionCondition
System..::.ObjectDisposedExceptionThe BlockingCollection<(Of <(T>)>) has been disposed.

See Also